import { createStore, combineReducers, applyMiddleware } from 'redux'
import count  from './reducers/count'
import num  from './reducers/num'
import list from './reducers/list'
import saga from 'redux-saga'
import rootSaga from './sagas'
// saga中间件需要再次调用一下

const createSaga = saga()

let reducer = combineReducers({
    count,
    num,
    list
})

let store = createStore(reducer, applyMiddleware(createSaga))

createSaga.run(rootSaga)

export default store